package com.nwpu.am.service;

import com.nwpu.am.pojo.dto.KnowledgeDTO;
import com.nwpu.am.pojo.entity.Knowledge;

import java.util.ArrayList;

/**
 * UserService
 *
 * @author Fbf
 * @version 1.0
 * {@code @date} 2024/6/5
 */


public interface KnowledgeService {
    /**
     * 展示知识库
     *
     * @retrun ArrayList<Knowledge>
     */
    ArrayList<Knowledge> getAllKnowledge();

    /**
     * 新增知识
     *
     * @param knowledgeDTO
     * @return int: 0-失败 1-成功
     */
    int addKnowledge(KnowledgeDTO knowledgeDTO);

    /**
     * 根据id删除知识
     *
     * @return int: 0-失败 1-成功
     */
    int deleteKnowledge(long knowledgeId);

    /**
     * 根据id查找知识
     *
     * @return Knowledge
     */
    Knowledge selectById(long knowledgeId);
}
